package com.example.service;

import com.example.dao.UserDao;
import com.example.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: wyp
 * @Date: 2021/9/2 13:53
 */
@Service
public class UserService {

    @Autowired
    private UserDao userDao;

    public boolean add(User user){
        return userDao.add(user);
    }

    public boolean update(User user){
        return userDao.update(user);
    }

    public boolean remove(User user){
        return userDao.remove(user);
    }

    public int selectCount(){
        return userDao.selectCount();
    }

    public User selectUser(Integer id){
        return userDao.selectUser(id);
    }

    public List<User> selectList(){
        return userDao.selectList();
    }

    public int batchAdd(List<Object[]> userList){
        return userDao.batchAdd(userList);
    }

    public int batchUpdate(List<Object[]> userList){
        return userDao.batchUpdate(userList);
    }

    public int batchRemove(List<Object[]> userList){
        return userDao.batchRemove(userList);
    }
}
